package com.tien.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

/**
 * @author Tien  E-mail:g.tianxin@gmail.com
 * @version Time：2011-6-17 下午10:48:13
 */
public class URLFilter implements Filter {

	@Override
	public void destroy() {}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain filterChain) throws IOException, ServletException {
//		HttpServletRequest httpRequest = (HttpServletRequest)request;
//		String urI = httpRequest.getRequestURI();
//		StringBuffer url = httpRequest.getRequestURL();
//		String paramUrl = httpRequest.getParameter("url");
//		System.out.println("Filtering... url:" + paramUrl);
		filterChain.doFilter(request,   response); 
	}

	@Override
	public void init(FilterConfig arg0) throws ServletException {}

}
 